package lambda;

import java.util.Comparator;

/**
 * 自定义比较器
 *
 * @author <a href="mailto:sjj@jianzhimao.com">mojo</a>
 * copyright (C), 2013-2022, 广州九尾信息科技有限公司
 * @date 2022/12/9 15:51
 */
public class MyComparator implements Comparator<Integer> {
    @Override
    public int compare(Integer o1, Integer o2) {
        return 0;
    }

    @Override
    public boolean equals(Object obj) {
        return false;
    }

    public static void main(String[] args) {
        compareTest();
    }

    private static void compareTest() {
        Integer i = 12;
        Integer j = 14;
        Comparator<Integer> comparator = Comparator.comparingInt(o -> o);
        System.out.println(comparator.compare(i, j));
    }
}
